package com.jiuwei.threadtest1.controller;

import com.jiuwei.threadtest1.service.DownLoadService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping
@Slf4j
public class DownLoadController {
    @Autowired
    private DownLoadService downLoadService;
    @PostMapping("/downLoad")
    public void downLoad() throws InterruptedException {
        downLoadService.download();
    }
}
